package com.mall.impl;

import com.mall.core.ShopingCart;
import com.mall.core.service.auth.Credential;
import com.mall.util.Id;
import com.mall.util.Name;
import com.mall.util.PersonName;



public class Customer implements com.mall.core.Customer{
private PersonName name=null;
private Id id=null;
private ShopingCart shopingcart=null;
private Credential credential =null;
public Credential getCredential() {
	return credential;
}


public void setCredential(Credential credential) {
	this.credential = credential;
}


public Id getId() {
	return id;
}


public void setName(PersonName name) {
	this.name = name;
}


public PersonName getName() {
	
	return  name;
}


public Id getID() {
	
	return id;
}
// take any subclass of type name
public void setName(Name name) {

	this.name= (PersonName) name;
}

public void setId(Id id) {
	this.id = id;
	
}

public void setShopingcart(ShopingCart shopingcart) {
	this.shopingcart = shopingcart;
}

public ShopingCart getShopingcart() {
	return shopingcart;
}


public static void main(String[] args){
	
	Customer customer= new Customer();
	customer.setName(new PersonName("Amos", "Omokpo", "A"));
	System.out.println(customer.getName().getName());
}


@Override
public boolean isLoggedin() {
	// TODO Auto-generated method stub
	return false;
}


@Override
public void setID(Id id) {
	// TODO Auto-generated method stub
	
}
}
